package cn.byapps.hw.controller;

import cn.byapps.hw.service.HomeworkService;
import cn.byapps.hw.vo.HomeworkVueDate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/homework")
public class HomeworkController {

    @Resource
    private HomeworkService homeworkService;

    @GetMapping
    public List<HomeworkVueDate> homeworkVueDates(Integer clazzId, Integer courseId) {
        return homeworkService.homeworkVueDates(clazzId, courseId);
    }
}
